//
//  Chapter.m
//  UMDReader
//
//  Created by 张 霄鹤 on 10-1-6.
//  Copyright 2010 xhzhang. All rights reserved.
//

#import "Chapter.h"


@implementation Chapter

@synthesize title;
@synthesize content;
@synthesize readloc;

- (id)initWithTitle:(NSString *)t andContent:(NSString *)c{
	if(self = [super init]){
		title = [t retain];
		content = [c retain];
		readloc = 0;
	}
	return self;
}

- (void)appendImage:(UIImage *)image{
	if(image){
		[imageList addObject:image];
	}
}

- (void)removeImage:(NSInteger)index{
	if(index > -1){
		int len = [imageList count];
		if(index < len){
			[imageList removeObjectAtIndex:index];
		}
	}
}

- (void)dealloc{
	
	[title release];
	[content release];
	[imageList release];
	
	[super dealloc];
}

@end
